﻿namespace Corporation.Project.Database
{
    /// <summary>
    /// 文章实体映射配置
    /// </summary>
    public class ArticleConfiguration : EntityTypeConfigurationBase<Article, Guid>
    {
        /// <summary>
        /// 重写以实现实体类型各个属性的数据库配置
        /// </summary>
        /// <param name="builder">实体类型创建器</param>
        public override void Configuration(EntityTypeBuilder<Article> builder)
        {
            builder.HasIndex(e => new { e.Type, e.Title }).SetIndex("TypeTitle", true);

        }
    }
}
